/**************************************************************************************
 *
 * @(#) TemplateContentEnums.java
 * @Package com.jgdt.jgdtkasannong_university_gene_backend.config.enums.template
 **************************************************************************************/
package com.jgdt.jgdtkasannong_university_gene_backend.config.enums.template;
/**
 * @description: 模板内容关系映射枚举 todo 可扩展为db数据
 * @author: huangAn
 * @createDate: 2025/04/18
 */
public enum TemplateContentEnums {
    /** ------------------------------------------> 科研团队 <------------------------------------------  **/
    RESEARCHTEAM_INTRODUCE(12, 20,"科研团队-团队介绍"),
    RESEARCHTEAM_TEAMLEADER(13, 20,"科研团队-团队带头人"),
    RESEARCHTEAM_KEYMEMBERS(14, 20,"科研团队-团队骨干成员"),


    /** ------------------------------------------> 科研成果 <------------------------------------------  **/
    ACHIEVEMENTS_INTRODUCE(15, 20,"科研成果-成果简介"),
    ACHIEVEMENTS_REPRESENTATIVE(17, 15,"科研成果-获奖成果"),
    REPRESENTATIVENESS_REPRESENTATIVE( 18, 15,"科研成果-代表性性成果"),
    PATENTABILITY_REPRESENTATIVE( 19, 15,"科研成果-专利性成果"),
    PAPER_REPRESENTATIVE(20, 15,"科研成果-论文性成果"),
    ACHIEVEMENTS_RESOURCES(16, 15,"科研成果-资源保护"),
    ;

    /**
     * 菜单id
     */
    private Integer menuid;
    /**
     * 描述
     */
    private String msg;

    public Integer getMaxNumber() {
        return maxNumber;
    }

    /**
     * 数据最大数量限制
     */

    private Integer maxNumber;

    public Integer getMenuid() {
        return menuid;
    }

    public String getMsg() {
        return msg;
    }

    TemplateContentEnums(Integer code,Integer maxNumber,String values) {
        this.menuid = code;
        this.maxNumber = maxNumber;
        this.msg = values;
    }


    public static String getValuesByCode(Integer code){
        for(TemplateContentEnums enums: TemplateContentEnums.values()){
            if(enums.getMenuid().equals(code)){
                return enums.getMsg();
            }
        }
        return null;
    }


    public static Integer getCodeByValues(String values){
        for(TemplateContentEnums enums: TemplateContentEnums.values()){
            if(enums.getMsg().equals(values)){
                return enums.getMenuid();
            }
        }
        return null;
    }

}




